//
//  ActivityJoinDetailModel.m
//  LovingPartyBuilding
//
//  Created by 刘应平 on 17/5/6.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "ActivityJoinDetailModel.h"

@implementation ActivityJoinDetailModel
- (void)setDESCRIPTION:(NSString *)DESCRIPTION{
    _DESCRIPTION = DESCRIPTION;
    self.HEIGHT = [CalculateLabelHeight calculateLabeHeightWithString:DESCRIPTION font:15 * [UIScreen zj_textFontScale] width:[UIScreen zj_screenWith] - 172 * [UIScreen zj_screenWScale] space:6 * [UIScreen zj_screenHScale]];
    
}


/**  获得党员通的拼接文字  */
- (NSString *)partyOpenJoinString{
    NSArray *array = [NSString getArrayFromString:self.START_TIME byString:@"."];
    NSString *time = [NSDateFormatter stringMonthAndHourAndMintueWithDate:array[0]];
    NSString *act;
    if ([self.NAME containsString:@"活动"]) {
        act = self.NAME;
    }else{
        act = [NSString stringWithFormat:@"%@活动",self.NAME];
    }
    NSString *string = [NSString stringWithFormat:@"%@将于%@开始，请准时参加",act,time];
    return string;
    
}

/**  获得党员通cell的高度  */
- (CGFloat)partyOpenCellHeight{
    CGFloat heigth = [CalculateLabelHeight calculateLabeHeightWithString:self.partyOpenJoinString font:15 * [UIScreen zj_textFontScale] width:[UIScreen zj_screenWith] - 90 * [UIScreen zj_screenWScale] space:5 * [UIScreen zj_screenHScale]] + 55 * [UIScreen zj_screenHScale];
    return heigth;
}


- (NSString *)description{
    return [self yy_modelDescription];
}
@end
